{\rtf1\mac\ansicpg10000\cocoartf102
{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;\f2\fnil\fcharset77 Monaco;
}
{\colortbl;\red255\green255\blue255;\red0\green0\blue0;\red0\green0\blue191;\red96\green96\blue96;
\red0\green115\blue0;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f0\b\fs36 \cf0 PV_Morph		one kind of spectral morphing\

\f1\b0\fs24 \

\f0\b PV_Morph.ar(bufferA,  bufferB, morph)\

\f1\b0 \
Morphs between two fft buffers.\

\f0\b bufferA
\f1\b0  - fft buffer A.\

\f0\b bufferB
\f1\b0  - fft buffer B.\

\f0\b morph
\f1\b0  - 0-1.\
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f2\fs18 \cf2 s.boot;\
(\
b = \cf3 Buffer\cf2 .alloc(s,2048,1);\
c = \cf3 Buffer\cf2 .alloc(s,2048,1);\
d = \cf3 Buffer\cf2 .read(s,\cf4 "sounds/a11wlk01.wav"\cf2 );\
)\
\
(\
\cf3 SynthDef\cf2 (\cf4 "help-morph"\cf2 , \{ \cf3 arg\cf2  out=0, bufnumA=0, bufnumB=1;\
	\cf3 var\cf2  inA, chainA, inB, chainB, chain;\
	inA = \cf3 Pulse\cf2 .ar(180, \cf3 LFCub\cf2 .kr(1, 0, 0.1, 0.3), 0.5);\
	inB = \cf3 VarSaw\cf2 .ar(190, 0, \cf3 LFCub\cf2 .kr(0.8, 0, 0.4, 0.5), 0.5);\
	chainA = \cf3 FFT\cf2 (bufnumA, inA);\
	chainB = \cf3 FFT\cf2 (bufnumB, inB);\
	chain = \cf3 PV_Morph\cf2 (chainA, chainB, \cf3 MouseX\cf2 .kr); \
	\cf3 Out\cf2 .ar(out, \cf3 IFFT\cf2 (chain).dup);\
\}).play(s,[\cf5 \\out\cf2 , 0, \cf5 \\bufnumA\cf2 , b.bufnum, \cf5 \\bufnumB\cf2 , c.bufnum ]);\
)\
\
(\
\cf3 SynthDef\cf2 (\cf4 "help-morph2"\cf2 , \{ \cf3 arg\cf2  out=0, bufnumA=0, bufnumB=1, soundBufnum=2;\
	\cf3 var\cf2  inA, chainA, inB, chainB, chain;\
	inA = \cf3 Mix\cf2 .ar(\cf3 Formant\cf2 .ar([120, 180], [1200, 2000], [240, 360], 0.2));\
	inB = \cf3 PlayBuf\cf2 .ar(1, soundBufnum, \cf3 BufRateScale\cf2 .kr(soundBufnum), loop: 1);\
	chainA = \cf3 FFT\cf2 (bufnumA, inA);\
	chainB = \cf3 FFT\cf2 (bufnumB, inB);\
	chain = \cf3 PV_Morph\cf2 (chainA, chainB, \cf3 MouseX\cf2 .kr); \
	\cf3 Out\cf2 .ar(out,  \cf3 IFFT\cf2 (chain).dup);\
\}).play(s,[\cf5 \\out\cf2 , 0, \cf5 \\bufnumA\cf2 , b.bufnum, \cf5 \\bufnumB\cf2 , c.bufnum, \cf5 \\soundBufnum\cf2 , d.bufnum]);\
)\
}